import { SaaSPageParams } from '/@/api/model/baseModel';

export type DataSourceParam = {
  dbIp: string;
};

export type DataSourcePageParam = { model: DataSourceParam } & SaaSPageParams;

export interface DataSourceListItem {
  instanceId: string;
  instanceName: string;
  dbIp: string;
  dbPort: string;
  dbUsername: string;
  dbPassword: string;
  isUsed: string;
  use: string;
  id: string;
}

export type DeleteParam = {
  rdsId: string;
};
export type CreateOrUpdateDataSourceParam = {
  instanceId: string;
  instanceName: string;
  dbIp: string;
  dbPort: string;
  dbUsername: string;
  dbPassword: string;
  isUsed: string;
};

export type DetailParams = {
  rdsId: string;
};

export type TestParam = {
  rdsId: string;
};

export interface UpdateParams {
  datastoreType: string;
  datastoreVersion: string;
  password: string;
  checkPassword: string;
  flavorRef: string;
  volumeType: string;
  volumeSize: number;
  rdsEndpoint: string;
  endpoint: string;
  slaveCount: number;
  masterAvailabilityZone: string;
  availabilityZoneMode: string;
  mode: string;
  timeZone: string;
  securityGroupId: string;
  subnetId: string;
  vpcId: string;
  availabilityZone: string;
  region: string;
  enterpriseProjectId: string;
  id: string;
  instanceId: string;
}
export interface DiskTypeItem {
  type: string;
  description: string;
}
export interface SizeCodeItem {
  code: string;
  description: string;
}

export interface DBVersionItem {
  id: string;
  name: string;
}
export interface SizeCodeParam {
  databaseName?: string;
  versionName: string;
}

export interface RdsSizeCodeItem {
  id: string;
  vcpus: string;
  ram: number;
  specCode: string;
  versionName: string[];
}
export interface RdsDiskTypeItem {
  name: string;
}
